package com.atwisdom.star.core.bsl.planner.entity;

import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * 采购订单
 */
@Data
public class PurchaseOrderSub {
    public final String className = "PurchaseOrder";
    private Long materialId;
    private String materialName;
    private String materialPCode;
    private String materialBCode;
    private String materialModel;
    private String materialSpec;
    private String materialUnit;
    private Integer quantity;  //在途量：planQuantity - arrivalQuantity
    private Integer planQuantity; //计划量
    private Integer arrivalQuantity; //到货量

    public Integer getQuantity() {
        if(this.planQuantity==null){
            this.planQuantity=0;
        }
        if(this.arrivalQuantity == null){
            this.arrivalQuantity = 0;
        }
        this.quantity = this.planQuantity+this.arrivalQuantity;
        return quantity;
    }
}
